package com.wandian.texas.entity;

import java.sql.Timestamp;

/**
 * @author long
 * @Create 2012-12-4 下午1:42:04
 * @QQ 108232706
 * @version 1.0
 * @description 聚宝盆
 */
public class CornucopiaEntity extends DataObject {
	public int Id;
	/**
	 * 积宝的回调id
	 */
	public String CornucopiaCallBack;
	/**
	 * 积宝类型，0，游戏端产生，1中心端主动发
	 */
	public byte CornucopiaType;
	/**
	 * 有没有经过中心端允许
	 */
	public boolean IsAllow = false;
	/**
	 * 有没有被游戏端开始发牌使用
	 */
	public boolean IsUsing = false;
	/**
	 * 游戏端游戏结束有没有计算出该积宝，
	 */
	public boolean IsSend = false;
	public int ServerId;
	public int RoomId;
	public int GameId;
	public int SeatId;
	public int UserId;
	public int idx;
	public String NickName;
	/**
	 * 积宝分得的钱
	 */
	public float WinMoney;
	/**
	 * 积宝牌型
	 */
	public int CardType;
	/**
	 * 最大手牌
	 */
	public String MaxCards;
	/**
	 * 积宝创建时间
	 */
	public Timestamp CreatTime;
	/**
	 * 游戏结束,发积宝到玩家账户时间
	 */
	public Timestamp WinTime;

	public CornucopiaEntity() {

	}

	public CornucopiaEntity(GameRoomEntity game, UserGameEntity user) {
		this.ServerId = game.ServerId;
		this.RoomId = game.RoomId;
		this.GameId = game.GameId;
		this.UserId = user.user.userId;
		this.idx = user.user.AccountId;
		this.NickName = user.user.nickName;
		this.CardType = user.cardType();
		this.MaxCards = user.getMaxCards();
		this.WinTime = new Timestamp(System.currentTimeMillis());
	}

	public CornucopiaEntity(int _serverId, int _roomId, int _gameId, int _userId, String _nickName, int _cardType, String _maxCards) {
		this.ServerId = _serverId;
		this.RoomId = _roomId;
		this.GameId = _gameId;
		this.UserId = _userId;
		this.NickName = _nickName;
		this.CardType = _cardType;
		this.MaxCards = _maxCards;
		this.WinTime = new Timestamp(System.currentTimeMillis());
	}
}
